<!DOCTYPE html>
<html>
<head>
    <title>菜品管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="/css/baseInfo.css">
    <link rel="stylesheet" href="/css/dishes.css">
</head>
<body>
<div class="container-fluid disbody">
    <ol class="breadcrumb">
        <li><a href="#"><h3>菜品管理</h3></a></li>
    </ol>
    <div style="float: right; margin-right: 30px;">
        <a class="btn btn-info" data-toggle="modal" data-target="#commonModal">自荐</a>
        <a class="btn btn-info" data-toggle="modal" data-target="#findModal">查询</a>
    </div>
    <table class="table table-hover table-striped">
        <thead>
        <tr>
            <td>名称</td>
            <td>描述</td>
            <td>效果图</td>
            <td>价格</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
    <div id="pageDiv" style="text-align: center">
        <ul id="pageLimit"></ul>
    </div>
</div  >

<div hidden class="modal fade" name="myModal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">更新</h4>
            </div>
            <div class="modal-body">
                <form id="dishesForm" class="form-horizontal" enctype="multipart/form-data">
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">菜名</label>
                        <div class="col-sm-10">
                            <input type="text" name="name" class="form-control" id="name">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="describe" class="col-sm-2 control-label">描述</label>
                        <div class="col-sm-10">
                            <textarea id="describe" name="describe" class="form-control" rows="3"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="price" class="col-sm-2 control-label">价格</label>
                        <div class="col-sm-10">
                            <input type="number" name="price" class="form-control" id="price">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="price" class="col-sm-2 control-label">现有图片</label>
                        <div class="col-sm-10">
                            <img id="showImg" src="" style="width: 200px;height: 200px">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="price" class="col-sm-2 control-label">图片上传</label>
                        <div class="col-sm-10">
                            <input type="file" id="img" name="img" onchange="changImg('#showImg', event)">
                        </div>
                    </div>
                    <input type="hidden" name="id" class="form-control" id="id">
                    <input type="hidden" name="method" class="form-control" value="updateDishe">
                    <input type="hidden" id="sId" name="sId" class="form-control">
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary confirmData">确认修改</button>
            </div>
        </div>
    </div>
</div>

<div hidden class="modal fade" name="findModal" id="findModal" tabindex="-1" role="dialog"
     aria-labelledby="myfindModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myfindModalLabel">查询</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" method="post">
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">菜名</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="findName">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary confirmFind">确认查询</button>
            </div>
        </div>
    </div>
</div>

<div hidden class="modal fade" name="commonModal" id="commonModal" tabindex="-1" role="dialog"
     aria-labelledby="commonModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="commonModalLabel">自荐</h4>
            </div>
            <div class="modal-body">
                <form id="recommonForm" class="form-horizontal" enctype="multipart/form-data">
                    <div class="form-group">
                        <label for="price" class="col-sm-2 control-label">自荐图片</label>
                        <div class="col-sm-10">
                            <img id="recommonPhoto" src="" style="width:100px;height:100px;">
                            <input type="file" name="img" onchange="changImg('#recommonPhoto', event)">
                        </div>
                    </div>
                    <input type="hidden" name="method" value="subRecommend">
                    <input type="hidden" name="mId" id="mysId">
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary confirmComon">确认提交</button>
            </div>
        </div>
    </div>
</div>

<div class="alert alert-success msgSuc" role="alert">修改成功！</div>
<div class="alert alert-warning  msgErr" role="alert">修改失败！</div>
<div class="alert alert-success  pushMsgSucc" role="alert">自荐成功！</div>
<div class="alert alert-warning  pushMsgErr" role="alert">自荐失败！</div>

<script src="/lib/js/bootstrap-paginator.js"></script>
<script src="/js/util/paginator.js"></script>
<script src="/js/util/checkOutDishes.js"></script>
<script src="/js/util/showPricture.js"></script>
<script src="/js/dishes.js"></script>
</body>
</html>

